<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9"/>
<title>NGUI: UIButtonColor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">NGUI
   &#160;<span id="projectnumber">3.11.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_u_i_button_color.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_u_i_button_color-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">UIButtonColor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Simple example script of how a button can be colored when the mouse hovers over it or it gets pressed.  
 <a href="class_u_i_button_color.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for UIButtonColor:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_u_i_button_color.png" usemap="#UIButtonColor_map" alt=""/>
  <map id="UIButtonColor_map" name="UIButtonColor_map">
<area href="class_u_i_widget_container.html" title="Widget container is a generic type class that acts like a non-resizeable widget when selecting things..." alt="UIWidgetContainer" shape="rect" coords="0,56,116,80"/>
<area href="class_u_i_button.html" title="Similar to UIButtonColor, but adds a &#39;disabled&#39; state based on whether the collider is enabled or not..." alt="UIButton" shape="rect" coords="0,168,116,192"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a917e731d45c5a7b576df2a485a5a23c2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a917e731d45c5a7b576df2a485a5a23c2"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>State</b> { <b>Normal</b>, 
<b>Hover</b>, 
<b>Pressed</b>, 
<b>Disabled</b>
 }</td></tr>
<tr class="separator:a917e731d45c5a7b576df2a485a5a23c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aed2f4c8ba9972d123a748b385c575480"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#aed2f4c8ba9972d123a748b385c575480">ResetDefaultColor</a> ()</td></tr>
<tr class="memdesc:aed2f4c8ba9972d123a748b385c575480"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the default color to what the button started with.  <a href="#aed2f4c8ba9972d123a748b385c575480">More...</a><br /></td></tr>
<tr class="separator:aed2f4c8ba9972d123a748b385c575480"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae65224797e350a91d071cafb1bed3eca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#ae65224797e350a91d071cafb1bed3eca">CacheDefaultColor</a> ()</td></tr>
<tr class="memdesc:ae65224797e350a91d071cafb1bed3eca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cache the default color &ndash; should only happen once.  <a href="#ae65224797e350a91d071cafb1bed3eca">More...</a><br /></td></tr>
<tr class="separator:ae65224797e350a91d071cafb1bed3eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2bdba93835df1dfc4809fd6ae1df161"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#ad2bdba93835df1dfc4809fd6ae1df161">SetState</a> (State <a class="el" href="class_u_i_button_color.html#aca4759992b37824b815130a148583be7">state</a>, bool instant)</td></tr>
<tr class="memdesc:ad2bdba93835df1dfc4809fd6ae1df161"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the visual state.  <a href="#ad2bdba93835df1dfc4809fd6ae1df161">More...</a><br /></td></tr>
<tr class="separator:ad2bdba93835df1dfc4809fd6ae1df161"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7e9964fb95882c2920ee15c9c228ae9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#ab7e9964fb95882c2920ee15c9c228ae9">UpdateColor</a> (bool instant)</td></tr>
<tr class="memdesc:ab7e9964fb95882c2920ee15c9c228ae9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the button's color. Call this method after changing the colors of the button at run-time.  <a href="#ab7e9964fb95882c2920ee15c9c228ae9">More...</a><br /></td></tr>
<tr class="separator:ab7e9964fb95882c2920ee15c9c228ae9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aebb73e7a3ee80001c85ae685c0c738c4"><td class="memItemLeft" align="right" valign="top">GameObject&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#aebb73e7a3ee80001c85ae685c0c738c4">tweenTarget</a></td></tr>
<tr class="memdesc:aebb73e7a3ee80001c85ae685c0c738c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Target with a widget, renderer, or light that will have its color tweened.  <a href="#aebb73e7a3ee80001c85ae685c0c738c4">More...</a><br /></td></tr>
<tr class="separator:aebb73e7a3ee80001c85ae685c0c738c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae579f4148d3e94f75b45a9dcedd2f9f6"><td class="memItemLeft" align="right" valign="top">Color&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#ae579f4148d3e94f75b45a9dcedd2f9f6">hover</a> = new Color(225f / 255f, 200f / 255f, 150f / 255f, 1f)</td></tr>
<tr class="memdesc:ae579f4148d3e94f75b45a9dcedd2f9f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Color to apply on hover event (mouse only).  <a href="#ae579f4148d3e94f75b45a9dcedd2f9f6">More...</a><br /></td></tr>
<tr class="separator:ae579f4148d3e94f75b45a9dcedd2f9f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94ffb5202f64d68d24950b21c893f7ba"><td class="memItemLeft" align="right" valign="top">Color&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#a94ffb5202f64d68d24950b21c893f7ba">pressed</a> = new Color(183f / 255f, 163f / 255f, 123f / 255f, 1f)</td></tr>
<tr class="memdesc:a94ffb5202f64d68d24950b21c893f7ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Color to apply on the pressed event.  <a href="#a94ffb5202f64d68d24950b21c893f7ba">More...</a><br /></td></tr>
<tr class="separator:a94ffb5202f64d68d24950b21c893f7ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d13480d0e126883ecc327e6426ed054"><td class="memItemLeft" align="right" valign="top">Color&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#a2d13480d0e126883ecc327e6426ed054">disabledColor</a> = Color.grey</td></tr>
<tr class="memdesc:a2d13480d0e126883ecc327e6426ed054"><td class="mdescLeft">&#160;</td><td class="mdescRight">Color that will be applied when the button is disabled.  <a href="#a2d13480d0e126883ecc327e6426ed054">More...</a><br /></td></tr>
<tr class="separator:a2d13480d0e126883ecc327e6426ed054"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5d787d257ac906a90c90712e3d34160"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#af5d787d257ac906a90c90712e3d34160">duration</a> = 0.2f</td></tr>
<tr class="memdesc:af5d787d257ac906a90c90712e3d34160"><td class="mdescLeft">&#160;</td><td class="mdescRight">Duration of the tween process.  <a href="#af5d787d257ac906a90c90712e3d34160">More...</a><br /></td></tr>
<tr class="separator:af5d787d257ac906a90c90712e3d34160"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aa8063270ea76ab3bbd3f2472b3659f98"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8063270ea76ab3bbd3f2472b3659f98"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnInit</b> ()</td></tr>
<tr class="separator:aa8063270ea76ab3bbd3f2472b3659f98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fed4630e4b77f8a612b4e5fa19a5d22"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#a3fed4630e4b77f8a612b4e5fa19a5d22">OnEnable</a> ()</td></tr>
<tr class="memdesc:a3fed4630e4b77f8a612b4e5fa19a5d22"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the initial state.  <a href="#a3fed4630e4b77f8a612b4e5fa19a5d22">More...</a><br /></td></tr>
<tr class="separator:a3fed4630e4b77f8a612b4e5fa19a5d22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03811e4496e06687bdc33318d0ee4824"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#a03811e4496e06687bdc33318d0ee4824">OnDisable</a> ()</td></tr>
<tr class="memdesc:a03811e4496e06687bdc33318d0ee4824"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the initial state.  <a href="#a03811e4496e06687bdc33318d0ee4824">More...</a><br /></td></tr>
<tr class="separator:a03811e4496e06687bdc33318d0ee4824"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5ce186771fbbc2ab768525767506225"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#ac5ce186771fbbc2ab768525767506225">OnHover</a> (bool isOver)</td></tr>
<tr class="memdesc:ac5ce186771fbbc2ab768525767506225"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the hover state.  <a href="#ac5ce186771fbbc2ab768525767506225">More...</a><br /></td></tr>
<tr class="separator:ac5ce186771fbbc2ab768525767506225"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a476a508a34da99f7dac30fee0be66412"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#a476a508a34da99f7dac30fee0be66412">OnPress</a> (bool isPressed)</td></tr>
<tr class="memdesc:a476a508a34da99f7dac30fee0be66412"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the pressed state.  <a href="#a476a508a34da99f7dac30fee0be66412">More...</a><br /></td></tr>
<tr class="separator:a476a508a34da99f7dac30fee0be66412"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0617981f7b7b57ecbb31920a4fd62e5d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#a0617981f7b7b57ecbb31920a4fd62e5d">OnDragOver</a> ()</td></tr>
<tr class="memdesc:a0617981f7b7b57ecbb31920a4fd62e5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the pressed state on drag over.  <a href="#a0617981f7b7b57ecbb31920a4fd62e5d">More...</a><br /></td></tr>
<tr class="separator:a0617981f7b7b57ecbb31920a4fd62e5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a368968ad1c87a8589d3439ec05d5113c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#a368968ad1c87a8589d3439ec05d5113c">OnDragOut</a> ()</td></tr>
<tr class="memdesc:a368968ad1c87a8589d3439ec05d5113c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the normal state on drag out.  <a href="#a368968ad1c87a8589d3439ec05d5113c">More...</a><br /></td></tr>
<tr class="separator:a368968ad1c87a8589d3439ec05d5113c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a32fe7178609b0a4d3e30ccc9a41ad838"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a32fe7178609b0a4d3e30ccc9a41ad838"></a>
Color&#160;</td><td class="memItemRight" valign="bottom"><b>mStartingColor</b></td></tr>
<tr class="separator:a32fe7178609b0a4d3e30ccc9a41ad838"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd65396db533713497f410250399c301"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd65396db533713497f410250399c301"></a>
Color&#160;</td><td class="memItemRight" valign="bottom"><b>mDefaultColor</b></td></tr>
<tr class="separator:afd65396db533713497f410250399c301"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc76c347075f03fd3b1ad20583e2b87a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abc76c347075f03fd3b1ad20583e2b87a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mInitDone</b> = false</td></tr>
<tr class="separator:abc76c347075f03fd3b1ad20583e2b87a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5bb6ec399ea9f8b51c71391fb556ea4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa5bb6ec399ea9f8b51c71391fb556ea4"></a>
<a class="el" href="class_u_i_widget.html">UIWidget</a>&#160;</td><td class="memItemRight" valign="bottom"><b>mWidget</b></td></tr>
<tr class="separator:aa5bb6ec399ea9f8b51c71391fb556ea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a880a160663e4afe429d74a635b1e8465"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a880a160663e4afe429d74a635b1e8465"></a>
State&#160;</td><td class="memItemRight" valign="bottom"><b>mState</b> = State.Normal</td></tr>
<tr class="separator:a880a160663e4afe429d74a635b1e8465"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:aca4759992b37824b815130a148583be7"><td class="memItemLeft" align="right" valign="top">State&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#aca4759992b37824b815130a148583be7">state</a><code> [get, set]</code></td></tr>
<tr class="memdesc:aca4759992b37824b815130a148583be7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Button's current state.  <a href="#aca4759992b37824b815130a148583be7">More...</a><br /></td></tr>
<tr class="separator:aca4759992b37824b815130a148583be7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55a05e249511c48c2f672242157d55fb"><td class="memItemLeft" align="right" valign="top">Color&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#a55a05e249511c48c2f672242157d55fb">defaultColor</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a55a05e249511c48c2f672242157d55fb"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_u_i_button_color.html" title="Simple example script of how a button can be colored when the mouse hovers over it or it gets pressed...">UIButtonColor</a>'s default (starting) color. It's useful to be able to change it, just in case.  <a href="#a55a05e249511c48c2f672242157d55fb">More...</a><br /></td></tr>
<tr class="separator:a55a05e249511c48c2f672242157d55fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addf5e6fdfefa1d7c72c8ed6c0488de45"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_button_color.html#addf5e6fdfefa1d7c72c8ed6c0488de45">isEnabled</a><code> [get, set]</code></td></tr>
<tr class="memdesc:addf5e6fdfefa1d7c72c8ed6c0488de45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the script should be active or not.  <a href="#addf5e6fdfefa1d7c72c8ed6c0488de45">More...</a><br /></td></tr>
<tr class="separator:addf5e6fdfefa1d7c72c8ed6c0488de45"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Simple example script of how a button can be colored when the mouse hovers over it or it gets pressed. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ae65224797e350a91d071cafb1bed3eca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIButtonColor.CacheDefaultColor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Cache the default color &ndash; should only happen once. </p>

</div>
</div>
<a class="anchor" id="a03811e4496e06687bdc33318d0ee4824"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIButtonColor.OnDisable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reset the initial state. </p>

</div>
</div>
<a class="anchor" id="a368968ad1c87a8589d3439ec05d5113c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIButtonColor.OnDragOut </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the normal state on drag out. </p>

<p>Reimplemented in <a class="el" href="class_u_i_button.html#a14104ef831e17e3d5f2dd770e10f1fdc">UIButton</a>.</p>

</div>
</div>
<a class="anchor" id="a0617981f7b7b57ecbb31920a4fd62e5d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIButtonColor.OnDragOver </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the pressed state on drag over. </p>

<p>Reimplemented in <a class="el" href="class_u_i_button.html#afd8c6580d3a4e02f5670b7e63c0c544a">UIButton</a>.</p>

</div>
</div>
<a class="anchor" id="a3fed4630e4b77f8a612b4e5fa19a5d22"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIButtonColor.OnEnable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the initial state. </p>

<p>Reimplemented in <a class="el" href="class_u_i_button.html#a58a189da2de1337343a7d5d999a01719">UIButton</a>.</p>

</div>
</div>
<a class="anchor" id="ac5ce186771fbbc2ab768525767506225"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIButtonColor.OnHover </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isOver</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the hover state. </p>

</div>
</div>
<a class="anchor" id="a476a508a34da99f7dac30fee0be66412"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIButtonColor.OnPress </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isPressed</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the pressed state. </p>

</div>
</div>
<a class="anchor" id="aed2f4c8ba9972d123a748b385c575480"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIButtonColor.ResetDefaultColor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reset the default color to what the button started with. </p>

</div>
</div>
<a class="anchor" id="ad2bdba93835df1dfc4809fd6ae1df161"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void UIButtonColor.SetState </td>
          <td>(</td>
          <td class="paramtype">State&#160;</td>
          <td class="paramname"><em>state</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>instant</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Change the visual state. </p>

<p>Reimplemented in <a class="el" href="class_u_i_button.html#aa0ad5ea4590de0b4fad7753579a4f827">UIButton</a>.</p>

</div>
</div>
<a class="anchor" id="ab7e9964fb95882c2920ee15c9c228ae9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIButtonColor.UpdateColor </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>instant</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update the button's color. Call this method after changing the colors of the button at run-time. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a2d13480d0e126883ecc327e6426ed054"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Color UIButtonColor.disabledColor = Color.grey</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Color that will be applied when the button is disabled. </p>

</div>
</div>
<a class="anchor" id="af5d787d257ac906a90c90712e3d34160"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float UIButtonColor.duration = 0.2f</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Duration of the tween process. </p>

</div>
</div>
<a class="anchor" id="ae579f4148d3e94f75b45a9dcedd2f9f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Color UIButtonColor.hover = new Color(225f / 255f, 200f / 255f, 150f / 255f, 1f)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Color to apply on hover event (mouse only). </p>

</div>
</div>
<a class="anchor" id="a94ffb5202f64d68d24950b21c893f7ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Color UIButtonColor.pressed = new Color(183f / 255f, 163f / 255f, 123f / 255f, 1f)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Color to apply on the pressed event. </p>

</div>
</div>
<a class="anchor" id="aebb73e7a3ee80001c85ae685c0c738c4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GameObject UIButtonColor.tweenTarget</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Target with a widget, renderer, or light that will have its color tweened. </p>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="a55a05e249511c48c2f672242157d55fb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Color UIButtonColor.defaultColor</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_u_i_button_color.html" title="Simple example script of how a button can be colored when the mouse hovers over it or it gets pressed...">UIButtonColor</a>'s default (starting) color. It's useful to be able to change it, just in case. </p>

</div>
</div>
<a class="anchor" id="addf5e6fdfefa1d7c72c8ed6c0488de45"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool UIButtonColor.isEnabled</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Whether the script should be active or not. </p>

</div>
</div>
<a class="anchor" id="aca4759992b37824b815130a148583be7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">State UIButtonColor.state</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Button's current state. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/WorkDir/Unity3D_Work/taidou_arpg/Assets/NGUI/Scripts/Interaction/UIButtonColor.cs</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_u_i_button_color.html">UIButtonColor</a></li>
    <li class="footer">Generated on Sat Jan 4 2020 22:30:28 for NGUI by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9 </li>
  </ul>
</div>
</body>
</html>
